package com.situ.javase.day6;

public class Number {
	private int num1;
	private int num2;

	public Number(int num1, int num2) {
		super();
		this.num1 = num1;
		this.num2 = num2;
	}

	public int add() {
		// 单一职能原则,打不打印应该由调用者决定
		// System.out.println(num1 + num2);
		return num1 + num2;
	}
	
	public int sub() {
		return num1 - num2;
	}

}
